package com.example.kafka.mq;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class MyConsumer {
    @KafkaListener(topics = "my_test")
    public void consume(String message) {
        System.out.println("接收到消息：" + message);
    }
}
